PageInfo.register({"type":"Start","info":function(){
 	
	/**
	 * 所有入口通过初始化进入 Start
	 * require: 需要哪些 外部引用
	 * 
	 * Pub: 公共方法对象
	 * Global: 此模块下全局遍历对象
	 * Router : 路由对象 
	 * */
	
	var Start = {};
	
	Start.require = {
		"$":"jquery"
	};
	Start.Router ={
	 	flag:"hash",
	 	list:{
	 		 "login/index"		:"/assets/js/components/login/index",
			 "admin/index":"/assets/js/components/admin/index",
			 "admin/company":"/assets/js/components/admin/company",
			 "admin/handle"	:"/assets/js/components/admin/handle"

			}
	 };
	
	Start.Global = {
		"id":"qlive-body",  //所有 主DIV
		"name":"ntq",       //项目名称
		"debug":false
	};
	 
	Start.Pub =function(){
		 var access_token = localStorage.getItem("auth");
		 var nurl         = location.href;
		 var hash         = location.hash;
		 
		 if(String.HasText(hash)){
		 	var key = hash.replace("#","");
		 	var $item = $("#ntq-index-tabs").find("li");
		 	
		 	for(var i=0,len=$item.length;i<len;i++){
		 		(function(i){
		 			var $this = $item[i]; 
		 			var stype = $this.getAttribute("data-type");
		 			if(stype == key){
		 				$this.setAttribute("class","layui-nav-item layui-this");
		 			}else{
		 				$this.setAttribute("class","layui-nav-item");
		 			}
		 		})(i)
		 	}
		 	
		 }
		 
		 
		 $("#ntq-index-tabs").find("li").unbind("click").bind("click",function(){
		 	$("#ntq-index-tabs").find("li.layui-this")[0].setAttribute("class","layui-nav-item");
		 	this.setAttribute("class","layui-nav-item layui-this")
		 });
		 
		 
         if(!String.HasText(access_token) && nurl.indexOf("#") > 0 )  window.location.href = (nurl+"").split("#")[0]
		
	};
 	
 	return Start;
	
}});



